package com.usian.controller;

import com.usian.pojo.Etc;
import com.usian.service.ETCService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
@RequestMapping("/etc")
public class ETCController   {

    @Autowired
    private ETCService etcService;

    @RequestMapping("/findAll")
    public String findAll(Model model){
        List<Etc> etcList = etcService.findAll();
        model.addAttribute("all",etcList);
         return "/indexEtc";
    }





}
